
{literal}
<script type="text/javascript">

var cbCount;

function selectAll(state){
	for(var i=0;i<document.userStats.elements.length;i++){
		if (document.userStats.elements[i].getAttribute('type')=='checkbox')
	 	document.userStats.elements[i].checked = state;
	}
}


function checkEmpty(){	//var formel = document.userStats.elements;	var isChecked = false;
	var i
	var s=0;	for(var i=0;i<document.userStats.elements.length;i++){		if (document.userStats.elements[i].getAttribute('type')=='checkbox' && document.userStats.elements[i].checked){
       isChecked = true;
       s++;
       }
	}
    return s;
}


function formSubmit(){
     if(!checkEmpty()) {     	alert ("Select at least one entry!");
     	return;
     }
     //alert(document.getElementById("action").value);
     if (document.getElementById("mailshotMode").value == "EmailNegativePerf"){     	 document.getElementById("action").value = 1;
     }
     //alert(document.getElementById("action").value);
     if (confirm("Message will be sent to "+checkEmpty()+" user(s)!"))
     document.userStats.submit();
}


function setNegativeCB() {
 	var cnter=1;
 	while(document.getElementById("trial"+cnter)) { 		if(document.getElementById("trial"+cnter).value=="" && document.getElementById("subscr"+cnter).value==0 && document.getElementById("pips"+cnter).value<=0) 			document.getElementById(cnter).checked=true; 		cnter++;
 	}
}

function showActCode(iid) {	var inputname = "code"+iid;
    if(document.getElementById("code"+iid).style.display=="none"){
 		document.getElementById("code"+iid).style.display="block";
 		//document.userStats.inputname.select();
 		//document.userStats.inputname.focus();
 	} else{
 		document.getElementById("code"+iid).style.display="none";
 	}
}

function deleteUser(uid,uname,umail) {

 	if (confirm("Do you really want to delate user "+uname+"("+umail+")?") && confirm("Do you still want to delate user "+uname+"("+umail+") ?")){
 			document.location="admin.php?p=userstats&uid="+uid+"&action=delete";
 	}
}


</script>
{/literal}

<h3>Discounts</h3>


<br><br>
<form method="POST" action="#" name="discounts">
<input type="hidden" name="process" value="1">
Prefix <input type="text" name="prefix" id="prefix">&nbsp;&nbsp;
Range <input size="4"  type="text" name="rangeStart" id="rangeStart">-
<input size="4" type="text" name="rangeEnd" id="rangeEnd">&nbsp;&nbsp;
<select cols="3" id="dsct_size" class="select" name="dsct_size">
        <option value="5" selected>5</option>
        <option value="10">10</option>
        <option value="15">15</option>
        <option value="20">20</option>
        <option value="25">25</option>
        <option value="30">30</option>
        <option value="35">35</option>
        <option value="40">40</option>
        <option value="45">45</option>
        <option value="50">50</option>
        <option value="55">55</option>
        <option value="60">60</option>
        <option value="65">65</option>
        <option value="70">70</option>
        <option value="75">75</option>
        <option value="80">80</option>
        <option value="85">85</option>
        <option value="90">90</option>
        <option value="95">95</option>
        <option value="100">Free :)</option>
        </select>%
<input type="submit" value="Insert">&nbsp;&nbsp;
</table>

</form>
